

<script setup>
// Vue2,vue3混用页
// 个人信息页面
//个人信息的修改打算直接重复调用一下注册页，直接修改

import { debounce } from "lodash";
import { ref, VueElement } from "vue";
import store from "../store";
var orgclick = function () {
  alert("请联系开发者QQ1503490056");
}
var logout = function () {
  window.localStorage.removeItem("user")
  location.replace("../../../index.html")
}
var fenxiang=function(){
     let url = 'https://pan.baidu.com/s/1eAOxB4eSJh58UvJaAByNzA?pwd=sf2c'
      let txa = document.createElement("textarea");   
      txa.value = url;
      document.body.appendChild(txa)
      txa.select(); 
      document.execCommand("Copy");  
      document.body.removeChild(txa);
      alert("想要把我们的APP分享给他人吗 \n链接：https://pan.baidu.com/s/1eAOxB4eSJh58UvJaAByNzA?pwd=sf2c \n提取码：sf2c \n已为您自动复制链接到剪切板")
}
</script>

<script>
export default {
  data() {
    return {
      IStouch: "endtouch"
    };
  },
  methods: {
    starttouch() {
      this.IStouch = "starttouch";
    },
    endtouch() {
      this.IStouch = "endtouch";
    }
  }
};
</script>



<template>
  <div class="main" v-if="(store.state.Stu[0].type == '军人') || (store.state.Stu[0].type == '学生')">
    <div class="grxx">个人信息</div>
    <div class="touxiang">
      头像
      <img :src="store.state.Stu[0].profile" alt />
    </div>
    <div class="div1"></div>
    <div class="nick">
      昵称
      <div class="nicheng">{{ store.state.Stu[0].nick }}</div>
    </div>
    <div class="nick xuehao">
      学号
      <div class="nicheng">{{ store.state.Stu[0].schNo }}</div>
    </div>
    <div class="div1" style="top:112px"></div>
    <div class="nick">
      性别
      <div class="nicheng">{{ store.state.Stu[0].gender }}</div>
    </div>
    <div class="div1" style="top:161px"></div>
    <div class="nick">
      书院
      <div class="nicheng">{{ store.state.Stu[0].insit }}</div>
    </div>
    <div class="div1" style="top:210px"></div>

    <div class="nick phone">
      手机号
      <div class="nicheng">{{ store.state.Stu[0].phoneNo }}</div>
    </div>
    <div class="div1" style="top:260px"></div>
    <div class="nick">
      QQ
      <div class="nicheng">{{ store.state.Stu[0].qqNo }}</div>
    </div>
    <div class="div1" style="top:310px"></div>
    <div class="nick">
      微信号
      <div class="nicheng">{{ store.state.Stu[0].wechatNo }}</div>
    </div>
    <a href='../change_msg/change_msg.html' class="nick xiugai" :class="IStouch" @touchstart="starttouch"
      @touchend="endtouch">
      修改信息
      <div class="nicheng"></div>
      <div class="zhuantiao">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-right" />
        </svg>
      </div>
    </a>
    <div class="logout nick" @click="logout()">退出登录</div>
  </div>
  <div class="main" v-else-if="store.state.Stu[0].type == '组织'">
    <div class="grxx">组织信息</div>
    <div class="touxiang">
      头像
      <img :src="store.state.Stu[0].profile" alt />
    </div>
    <div class="div1"></div>
    <div class="nick">
      组织名称
      <div class="nicheng">{{ store.state.Stu[0].orgName }}</div>
    </div>
    <div class="nick xuehao">
      组织介绍
      <div class="nicheng jieshao">{{ store.state.Stu[0].orgIntro }}</div>
    </div>


    <a class="nick xuehao" href="../upload_policy/upload_policy.html">
      上传政策
    </a>
    <div class="div1" style="top:171px"></div>

    <a class="nick" href="../upload_act/upload_act.html">
      上传活动
    </a>
    <div class="div1" style="top:222px"></div>

    <a class="nick" href="../upload_volunteer/upload_volunteer.html">
      上传志愿者
    </a>
    <div class="xinxi1">*如有修改政策，活动，志愿者需求，请联系开发者QQ：369693418</div>

    <div class="nick xiugai" :class="IStouch" @touchstart="starttouch" @touchend="endtouch" @click="orgclick">
      修改信息
      <div class="nicheng"></div>
      <div class="zhuantiao">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-right" />
        </svg>
      </div>
    </div>
    <div class="logout nick" @click="logout()">退出登录</div>
  </div>
  <div class="fenxiang" @click="fenxiang()"><svg class="icon" aria-hidden="true">
      <use xlink:href="#icon-7" />
    </svg></div>
</template>

<style scoped>
* {
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
  color: black;
}

.main {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #f2f2f2;
  width: 100%;
  height: 900px;
}
.xinxi1{
  font-size: 12px;
  color: #414141;
}
.fenxiang{
  position: absolute;
  display: block;
  right: 3px;
  bottom: 160px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  line-height: 60px;
  font-size: 22px;
  background-color: #fff;
  box-shadow: 0 0 3px #898989;
}
.jieshao {
  display: inline-block;
  width: 51.3%;
  text-align: right;
  /* background-color: pink; */
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.grxx {
  /* display: block; */
  /* background-color: gray; */
  width: 100%;
  /* position: absolute; */
  font-size: 20px;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
  color: rgb(79, 79, 79);
}

.main>.logout {
  position: absolute;
  bottom: 150px;
  right: 0;
  width: 92.3%;
  font-size: 18px;
  border-radius: 20px;
  margin-left: 15px;
  margin-right: 15px;
  padding-left: calc(46.2% - 36px);
  color: red;
}

.touxiang {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  height: 90px;
  background-color: #fff;
  line-height: 90px;
  padding-left: 15px;
}

.touxiang>img {
  display: block;
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  right: 35px;
  top: calc(50% - 30px);
  box-shadow: 0 0 2px gray;
}

.div1 {
  width: 100%;
  height: 0;
  border-bottom: 1px solid #f2f2f2;
  margin-left: calc(50% - 180px);
  position: relative;
  z-index: 999;
}

.nick {
  box-sizing: border-box;
  background-color: #fff;
  float: left;
  margin-top: -1px;
  height: 51px;
  padding-top: 1px;
  width: 100%;
  position: relative;
  line-height: 51px;
  padding-left: 15px;
}

.nick>.nicheng {
  position: absolute;
  color: rgb(79, 79, 79);
  font-size: 13px;
  top: 2px;
  right: 25px;
}

.xuehao {
  margin-top: 10px;
}

.mima {
  margin-top: 10px;
  height: 56px;
}

.zhuantiao {
  position: absolute;
  width: 20px;
  height: 20px;
  right: 34px;
  top: 3px;
  font-size: 20px;
}

.starttouch {
  background-color: #f2f2f2;
}

.xiugai {
  height: 53px;
  vertical-align: middle;
  margin-top: 20px;
}
</style>